﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;

namespace App.Model
{
    public class SysUser
    {
        /// <summary>
        /// 用户编号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        public int DepartId { get; set; }

        /// <summary>
        /// 用户账号
        /// </summary>
        [SugarColumn(ColumnDataType = "VARCHAR(32)")]
        public string Acct { get; set; }

        /// <summary>
        /// 用户姓名
        /// </summary>
        [SugarColumn(ColumnDataType = "VARCHAR(32)")]
        public string ChName { get; set; }

        /// <summary>
        /// 用户密码
        /// </summary>
        [SugarColumn(ColumnDataType = "VARCHAR(64)")]
        public string Pwd { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [SugarColumn(ColumnDataType = "VARCHAR(32)", IsNullable = true)]
        public string Phone { get; set; }

        /// <summary>
        /// 紧急联系人
        /// </summary>
        [SugarColumn(ColumnDataType = "VARCHAR(64)", IsNullable = true)]
        public string EmergencyContact { get; set; }

        /// <summary>
        /// 紧急联系人 电话
        /// </summary>
        [SugarColumn(ColumnDataType = "VARCHAR(32)", IsNullable = true)]
        public string EmergencyPhone { get; set; }

        /// <summary>
        /// 住址
        /// </summary>
        [SugarColumn(ColumnDataType = "VARCHAR(512)", IsNullable = true)]
        public string Address { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        public int RoleId { get; set; }

        /// <summary>
        /// 是否禁用 0 启用 1 禁用
        /// </summary>
        public int Disable { get; set; }

        /// <summary>
        /// 是否包含强制 0 无强制权限 1 有强制权限
        /// </summary>
        public int Abandon { get; set; }

        /// <summary>
        /// 是否删除 0  1 删除
        /// </summary>
        public int IsDelete { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddTime { get; set; }

        /// <summary>
        /// 是否超管
        /// </summary>

        public int IsAdmin { get; set; }

        /// <summary>
        /// 操作员
        /// </summary>
        public int AddUser { get; set; }

        /// <summary>
        /// 禁用 文字显示
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ShowDisable { get; set; }

        /// <summary>
        /// 确认密码
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string CPwd { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string DepartName { get; set; }

        /// <summary>
        /// 时间显示字符串
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ShowTime { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        [SugarColumn(IsIgnore = true)] 
        public string RoleName { get; set; }

        [SugarColumn(IsIgnore = true)]
        public string Authority { get; set; }

        [SugarColumn(IsIgnore = true)]
        public List<string> Authoritys { get; set; }
    }
}
